import React from 'react';
import { Column } from '@ant-design/charts';

const DemoColumn = (props) => {

    const { data, config } = props;
    console.log()
    return (
        <Column
            {...config}
            onReady={(plot) => {
                plot.on('plot:click', (evt) => {
                    const { x, y } = evt;
                    const { xField } = plot.options;
                    const tooltipData = plot.chart.getTooltipItems({ x, y });
                    console.log(tooltipData);
                });
            }}
        />
    );
};

export default DemoColumn;